﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace assignment_manager
{
    /// <summary>
    /// Interaction logic for NewSubject.xaml
    /// </summary>
    public partial class NewSubject : Window
    {
        public NewSubject()
        {
            InitializeComponent();
        }

        private void btn_newSubjectCancel_Click(object sender, RoutedEventArgs e)
        {
            newSubjectWnd.Close();
        }

        private void btn_newSubjectCreate_Click(object sender, RoutedEventArgs e)
        {
            Subject newSubject = new Subject();
            newSubject.Title = txtBox_subjectTitle.Text;
            // add it to the list
            MainWindow.subjects.Add(newSubject);
            this.Close();
        }
    }
}
